<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="js/tools/jquery-1.4.2.min.js"></script>
<script charset="utf-8" src="js/editor/kindeditor.js"></script>
		<script>
			KE.show({
				id : 'content',
				resizeMode : 1,
				allowPreviewEmoticons : false,
				allowUpload : false,
				items : [
				'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist']
			});
           function selectCategory()
           {
              var id=$("#category").val();
               window.location.href="system.action?id="+id+"&flag=0";
               
           }
           $(document).ready(function(){
              $.getJSON("../../groupbyajax/system!culmnlist.action",function(data){
                var option="";
                   for(var i=0;i<data.success.length;i++)
                   {
                     option+="<option value='"+data.success[i].id+"'>"+data.success[i].category+"</option>";
                   }
                   $("#category").html(option);
              });
           })
           function check()
           {
             var count=KE.count("content");
             if(count>3000)
             {
               alert("字数太长,不能超过3000!");
               return false;
             }
             return true;
           }
		</script>

<style>
table{table-layout:fixed;font-size:12px;}
  tr{background-color:#F1F6F6;}
  td{border:1px solid #D9D9D9;color:black;padding:2px;}
</style>
</head>
<body>
 <form action="system!updateBasicInfor.action?flag=0" method="post" onsubmit="return check();">
 <input type="hidden" id="id" name="id" value="<s:property value="basicInfor.id"/>">
 <table  style="width:80%;" align="center">
 <tr>
    <td width="80">类别:</td>
    <td>
       <select name="category" id="category" onchange="selectCategory()">
          
       </select>
    </td>
</tr>
 <tr>
    <td width="80">内容:</td>
    <td>
       <textarea id="content" name="content" style="width:700px;height:300px;visibility:hidden;"><s:property value="basicInfor.content" escape="false"/></textarea>
    </td>
</tr>
<tr>
<td colspan="2" align="center">
       <input type="submit" value="保存">
    </td>
    </tr>
</table>
</form>
</body>
</html>